﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Obligatorio.DataAccess;

public partial class Stock_Historico : System.Web.UI.Page, IMarketingView
{
    #region Fields
    MarketingPresenter _presenter;
    #endregion

    protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);
        _presenter = new MarketingPresenter(this);
    }

    protected void Page_Load(object sender, EventArgs e)
    {
        _presenter.GetBranches();
        if (!IsPostBack)
        {
            ddlBranches.DataSource = this.Branches;
            ddlBranches.DataBind();
        }
        _presenter.GetProviders();
        if (!IsPostBack)
        {
            ddlProviders.DataSource = this.Providers;
            ddlProviders.DataBind();
        }
    }

    public IEnumerable<Branch> Branches
    {
        private get;
        set;
    }

    public IEnumerable<Provider> Providers
    {
        private get;
        set;
    }
}